/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package model;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author elfatah
 */
@Entity
@Table(name = "supplyer")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Supplyer.findAll", query = "SELECT s FROM Supplyer s"),
    @NamedQuery(name = "Supplyer.findBySupplyerId", query = "SELECT s FROM Supplyer s WHERE s.supplyerId = :supplyerId"),
    @NamedQuery(name = "Supplyer.findByNama", query = "SELECT s FROM Supplyer s WHERE s.nama = :nama"),
    @NamedQuery(name = "Supplyer.findByAlamat", query = "SELECT s FROM Supplyer s WHERE s.alamat = :alamat"),
    @NamedQuery(name = "Supplyer.findByTelp", query = "SELECT s FROM Supplyer s WHERE s.telp = :telp")})
public class Supplyer implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "SUPPLYER_ID")
    private Integer supplyerId;
    @Column(name = "NAMA")
    private String nama;
    @Column(name = "ALAMAT")
    private String alamat;
    @Column(name = "TELP")
    private String telp;

    public Supplyer() {
    }

    public Supplyer(Integer supplyerId) {
        this.supplyerId = supplyerId;
    }

    public Integer getSupplyerId() {
        return supplyerId;
    }

    public void setSupplyerId(Integer supplyerId) {
        this.supplyerId = supplyerId;
    }

    public String getNama() {
        return nama;
    }

    public void setNama(String nama) {
        this.nama = nama;
    }

    public String getAlamat() {
        return alamat;
    }

    public void setAlamat(String alamat) {
        this.alamat = alamat;
    }

    public String getTelp() {
        return telp;
    }

    public void setTelp(String telp) {
        this.telp = telp;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (supplyerId != null ? supplyerId.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Supplyer)) {
            return false;
        }
        Supplyer other = (Supplyer) object;
        if ((this.supplyerId == null && other.supplyerId != null) || (this.supplyerId != null && !this.supplyerId.equals(other.supplyerId))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "model.Supplyer[ supplyerId=" + supplyerId + " ]";
    }
    
}
